{
 "metadata": {
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.6"
  },
  "orig_nbformat": 4,
  "kernelspec": {
   "name": "python3",
   "display_name": "Python 3.9.6 64-bit"
  },
  "interpreter": {
   "hash": "e4d85d63baa40a9854e1e91e14fde8d7f9b9a564a40f3bc91b58b47abf2bd79f"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2,
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "source": [
    "import pandas\r\n",
    "data = pandas.read_csv(\"./users.csv\")\r\n"
   ],
   "outputs": [],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "source": [
    "data.head()"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "              name                                  email  \\\n",
       "0      Erin Fisher                        sreed@jones.com   \n",
       "1      John Thomas             qtaylor@knox-morrison.info   \n",
       "2   Adrian Parsons                     jandrews@yahoo.com   \n",
       "3  Jessica Collins                 hansonsteven@gmail.com   \n",
       "4     Ethan Kramer  christopherfletcher@ponce-benitez.com   \n",
       "\n",
       "                         company  \\\n",
       "0                     Bell-Brown   \n",
       "1     Torres, Moore and Gonzalez   \n",
       "2  Williams, Mcdonald and Briggs   \n",
       "3                 Simpson-Sutton   \n",
       "4                 Moore-Johnston   \n",
       "\n",
       "                                             address country_code  \n",
       "0  49770 Anna River Apt. 626\\r\\nPatrickbury, SC 7...           AF  \n",
       "1  78868 Maldonado Drive Apt. 158\\r\\nTrujilloboro...           MA  \n",
       "2         36408 Jones Freeway\\r\\nBatesfort, NE 86797           MR  \n",
       "3      335 Bonilla Streets\\r\\nNorth Justin, AK 30388           NE  \n",
       "4      954 Harry Prairie\\r\\nEast Jamieview, KY 04515           NO  "
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>email</th>\n",
       "      <th>company</th>\n",
       "      <th>address</th>\n",
       "      <th>country_code</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Erin Fisher</td>\n",
       "      <td>sreed@jones.com</td>\n",
       "      <td>Bell-Brown</td>\n",
       "      <td>49770 Anna River Apt. 626\\r\\nPatrickbury, SC 7...</td>\n",
       "      <td>AF</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>John Thomas</td>\n",
       "      <td>qtaylor@knox-morrison.info</td>\n",
       "      <td>Torres, Moore and Gonzalez</td>\n",
       "      <td>78868 Maldonado Drive Apt. 158\\r\\nTrujilloboro...</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Adrian Parsons</td>\n",
       "      <td>jandrews@yahoo.com</td>\n",
       "      <td>Williams, Mcdonald and Briggs</td>\n",
       "      <td>36408 Jones Freeway\\r\\nBatesfort, NE 86797</td>\n",
       "      <td>MR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Jessica Collins</td>\n",
       "      <td>hansonsteven@gmail.com</td>\n",
       "      <td>Simpson-Sutton</td>\n",
       "      <td>335 Bonilla Streets\\r\\nNorth Justin, AK 30388</td>\n",
       "      <td>NE</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Ethan Kramer</td>\n",
       "      <td>christopherfletcher@ponce-benitez.com</td>\n",
       "      <td>Moore-Johnston</td>\n",
       "      <td>954 Harry Prairie\\r\\nEast Jamieview, KY 04515</td>\n",
       "      <td>NO</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "execution_count": 8
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "source": [
    "data[data[\"name\"].str.contains(\"so\")]"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "                name                      email  \\\n",
       "2     Adrian Parsons         jandrews@yahoo.com   \n",
       "12  Vanessa Anderson     nguyenthomas@glenn.com   \n",
       "55    Kathy Morrison  parkerkathleen@bailey.com   \n",
       "63     Wanda Johnson     davisdonna@hotmail.com   \n",
       "68      Sarah Wilson       weekssteven@lang.org   \n",
       "70     Kyle Thompson         alyssa42@white.org   \n",
       "96     Robert Wilson  thompsonkenneth@gmail.com   \n",
       "\n",
       "                          company  \\\n",
       "2   Williams, Mcdonald and Briggs   \n",
       "12                   Miller-Kline   \n",
       "55                Palmer-Delacruz   \n",
       "63                  Murphy-Martin   \n",
       "68    Flores, Shaffer and Jimenez   \n",
       "70                     Grimes LLC   \n",
       "96                      Kirk-Wood   \n",
       "\n",
       "                                              address country_code  \n",
       "2          36408 Jones Freeway\\r\\nBatesfort, NE 86797           MR  \n",
       "12  89398 Lee Road Apt. 000\\r\\nEast Rodneyhaven, M...           RO  \n",
       "55   5554 Paula Pines Apt. 564\\r\\nEast Ruth, NH 20339           ER  \n",
       "63       91152 Angela Lights\\r\\nPort Rachel, MS 17301           TO  \n",
       "68  02288 Blake Garden Suite 845\\r\\nPort Derek, NE...           TJ  \n",
       "70       0228 Ronald Crest\\r\\nKristinamouth, NY 37879           LK  \n",
       "96      06938 Jonathon Ranch\\r\\nEast Kelsey, ND 58379           JM  "
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>email</th>\n",
       "      <th>company</th>\n",
       "      <th>address</th>\n",
       "      <th>country_code</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Adrian Parsons</td>\n",
       "      <td>jandrews@yahoo.com</td>\n",
       "      <td>Williams, Mcdonald and Briggs</td>\n",
       "      <td>36408 Jones Freeway\\r\\nBatesfort, NE 86797</td>\n",
       "      <td>MR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>Vanessa Anderson</td>\n",
       "      <td>nguyenthomas@glenn.com</td>\n",
       "      <td>Miller-Kline</td>\n",
       "      <td>89398 Lee Road Apt. 000\\r\\nEast Rodneyhaven, M...</td>\n",
       "      <td>RO</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>55</th>\n",
       "      <td>Kathy Morrison</td>\n",
       "      <td>parkerkathleen@bailey.com</td>\n",
       "      <td>Palmer-Delacruz</td>\n",
       "      <td>5554 Paula Pines Apt. 564\\r\\nEast Ruth, NH 20339</td>\n",
       "      <td>ER</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>63</th>\n",
       "      <td>Wanda Johnson</td>\n",
       "      <td>davisdonna@hotmail.com</td>\n",
       "      <td>Murphy-Martin</td>\n",
       "      <td>91152 Angela Lights\\r\\nPort Rachel, MS 17301</td>\n",
       "      <td>TO</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>68</th>\n",
       "      <td>Sarah Wilson</td>\n",
       "      <td>weekssteven@lang.org</td>\n",
       "      <td>Flores, Shaffer and Jimenez</td>\n",
       "      <td>02288 Blake Garden Suite 845\\r\\nPort Derek, NE...</td>\n",
       "      <td>TJ</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>70</th>\n",
       "      <td>Kyle Thompson</td>\n",
       "      <td>alyssa42@white.org</td>\n",
       "      <td>Grimes LLC</td>\n",
       "      <td>0228 Ronald Crest\\r\\nKristinamouth, NY 37879</td>\n",
       "      <td>LK</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>Robert Wilson</td>\n",
       "      <td>thompsonkenneth@gmail.com</td>\n",
       "      <td>Kirk-Wood</td>\n",
       "      <td>06938 Jonathon Ranch\\r\\nEast Kelsey, ND 58379</td>\n",
       "      <td>JM</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "execution_count": 5
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "source": [
    "data[\"name\"].value_counts()"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "Erin Fisher         1\n",
       "Wanda Johnson       1\n",
       "Aaron Maldonado     1\n",
       "Travis Schmidt      1\n",
       "Ronald Taylor       1\n",
       "                   ..\n",
       "Lauren Gordon       1\n",
       "Jillian Eaton       1\n",
       "Becky Smith         1\n",
       "Christopher Lang    1\n",
       "Gerald Bridges      1\n",
       "Name: name, Length: 100, dtype: int64"
      ]
     },
     "metadata": {},
     "execution_count": 10
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "source": [
    "data[data.name.str.contains(\"Thomas\")]"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "                  name                       email  \\\n",
       "1          John Thomas  qtaylor@knox-morrison.info   \n",
       "60        Amber Thomas   frazierjohn@hernandez.biz   \n",
       "85  Derrick Thomas Jr.         zmckinney@yahoo.com   \n",
       "\n",
       "                       company  \\\n",
       "1   Torres, Moore and Gonzalez   \n",
       "60                 Moore Group   \n",
       "85       Kim, Miller and Kelly   \n",
       "\n",
       "                                              address country_code  \n",
       "1   78868 Maldonado Drive Apt. 158\\r\\nTrujilloboro...           MA  \n",
       "60            75466 Cole Cliffs\\r\\nSaraside, SC 00528           VN  \n",
       "85          253 Sierra Gardens\\r\\nNew David, MD 18585           MX  "
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>email</th>\n",
       "      <th>company</th>\n",
       "      <th>address</th>\n",
       "      <th>country_code</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>John Thomas</td>\n",
       "      <td>qtaylor@knox-morrison.info</td>\n",
       "      <td>Torres, Moore and Gonzalez</td>\n",
       "      <td>78868 Maldonado Drive Apt. 158\\r\\nTrujilloboro...</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>60</th>\n",
       "      <td>Amber Thomas</td>\n",
       "      <td>frazierjohn@hernandez.biz</td>\n",
       "      <td>Moore Group</td>\n",
       "      <td>75466 Cole Cliffs\\r\\nSaraside, SC 00528</td>\n",
       "      <td>VN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>85</th>\n",
       "      <td>Derrick Thomas Jr.</td>\n",
       "      <td>zmckinney@yahoo.com</td>\n",
       "      <td>Kim, Miller and Kelly</td>\n",
       "      <td>253 Sierra Gardens\\r\\nNew David, MD 18585</td>\n",
       "      <td>MX</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "execution_count": 21
    }
   ],
   "metadata": {}
  }
 ]
}